public class MethodDemo {
    public static void main(String[] args) {
        // 在主函数中调用 calcArea方法
        int area = calcArea(2, 4);
        System.out.println(area);
    }

    public static int calcArea(int width, int height) {
        return width * height;
    }
}